<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  function func1(arg1) {
    console.log('func1', arg1)
    return arg1()
  }
  function func2(arg2) {
    console.log('func2', arg2)
    return arg2()
  }
  function func3(arg3) {
    console.log('func3', arg3)
    return arg3()
  }
  function func4(arg4) {
    console.log('func4', arg4)
    return arg4()
  }
  function func5(arg5) {
    console.log('func5', arg5)
    return arg5()
  }

  function reducer(args, func) {
    console.log('reducer')
    return args.reduce((prev, next) => {
      return () => next(prev)
    }, func)
  }

  const data = reducer([func1, func2, func3, func4, func5], () => {
    console.log('vvvvvvvvvvvvvvvvvv')
  })()
</script>
</body>
</html>